package com.p2p.controller.operationsManagement;

import com.p2p.common.DTO.ExperienceRecordDTO;
import com.p2p.common.base.RespResult;
import com.p2p.service.operationsManagementService.ExperienceRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
@RequestMapping("/experienceRecord")
public class ExperienceRecordController {

    @Autowired
    private ExperienceRecordService experienceRecordService;

    /**
     * 分页显示体验金记录
     * @param currentPage
     * @param pageSize
     * @return
     */
    @GetMapping("/experienceRecordList")
    @ResponseBody
    public RespResult experienceRecordList(Integer currentPage, Integer pageSize){

        return experienceRecordService.experienceRecordList(currentPage,pageSize);
    }

    /**
     * 高级查询
     * @return
     */
    @PostMapping("/search")
    @ResponseBody
    public RespResult search(@RequestBody ExperienceRecordDTO experienceRecordDTO,Integer currentPage,Integer pageSize){
        return experienceRecordService.search(experienceRecordDTO,currentPage,pageSize);
    }
}
